import type { EditorInfoType, EditorType } from "./types";

export class Editor implements EditorType {

    #editorInfo:EditorInfoType;
    action: Function | undefined;
    
    constructor(editorInfo: EditorInfoType) {
        this.#editorInfo = editorInfo
    }

    /**
     * 获取操作符的按钮名称："清空" | "⇤" | "="
     * @returns 操作符的按钮名称："清空" | "⇤" | "="
     */
    getBasic() {
        return this.#editorInfo.basic;
    }

    /**
     * 获取操作符的式子显示名称："清空" | "⇤" | "等于"
     * @returns 操作符的式子显示名称："清空" | "⇤" | "等于"
     */
    getQuote() {
        return this.#editorInfo.quote;
    }
}